<template>
    <div id="home">
        <h2>这是MyVue组件</h2>
        <h2>{{$store.state.count}}</h2>
        <h3>平方:{{$store.getters.quadratic}}</h3>
        <!-- 通过getters来筛选数据 -->
        <div>
            <li v-for="itm in info" :key="itm">
                {{itm}}
            </li>
            长度为:{{$store.getters.filterInfo.length}}
        </div>
        <h4>{{$store.getters.testGetters}}</h4>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                info:this.$store.getters.filterInfo
            }
        }
    }
</script>

<style>
    #home{
        border: 1px solid red;
        margin-bottom: 10px;
    }
</style>